import { BaseEntity } from '../../../base/entity/base';
import { Column, Entity } from 'typeorm';

/**
 * 产品退款相关配置
 */
@Entity('product_refund_config', { comment: '产品退款配置' })
export class ProductRefundConfigEntity extends BaseEntity {
    @Column({ comment: '产品ID', type: 'int' })
    productId: number;

    @Column({ comment: '退款类型', type: 'enum', enum: ['fixed', 'percentage'] })
    type: 'fixed' | 'percentage'; // 固定金额 百分比

    @Column({ comment: '退款金额或比例', type: 'decimal', precision: 10, scale: 2 })
    value: number; // 退款金额 或 退款比例

}
